import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import get from '@dfeidao/atom-web/local/get';
import remove from '@dfeidao/atom-web/local/remove';
import render from "@dfeidao/atom-web/render/render";
import remove_node from '@dfeidao/atom-web/ui/remove-node';
import set_nodes_cls from '@dfeidao/atom-web/ui/set-nodes-cls';
import p000 from './p000';
import p001 from './p001';
import p003 from './p003';
export default async function a003(fd: IFeidaoAiBrowserComponent) {
	//  关闭
	fd.data.node.classList.add('display-n');
	remove(fd, 'ss');
	remove(fd, 'aa');
	const nodes = Array.from(fd.data.node.querySelectorAll('[vlist]')) as HTMLElement[];
	set_nodes_cls(nodes, 'bg-c', false);
	// delete fd.data.feild;
	const r_node = fd.data.node.querySelector<HTMLDivElement>('[data-feidao-presentation="P02"]');
	Array.from(r_node.childNodes).map((v: HTMLSpanElement) => {
		remove_node(v);
	});
	const arr = get(fd, 'biaotou');
	// console.log(arr)
	render(fd, arr, p000, 'p000', 'inner');
	render(fd, '', p001, 'p001', 'inner');
	fd.data.node.querySelector<HTMLDivElement>('[data-feidao-presentation="p005"]').innerHTML = '';
	fd.data.node.querySelector<HTMLDivElement>('[data-feidao-presentation="p003"]').classList.remove('display-n');
	render(fd, '', p003, 'p003', 'inner');
}
